package org.tis.tools.senior.module.developer.entity;

import com.alibaba.fastjson.annotation.JSONField;
import com.baomidou.mybatisplus.annotations.TableId;
import com.baomidou.mybatisplus.annotations.TableName;
import lombok.Data;
import org.tis.tools.model.enums.CommonEnumDeserializer;
import org.tis.tools.senior.module.core.entity.cascade.CommonCascadeSerializer;
import org.tis.tools.senior.module.developer.entity.enums.RollbackStatus;

import java.io.Serializable;
import java.util.Date;

/**
 * sRollback
 * 
 * @author Auto Generate Tools
 * @date 2018/09/26
 */
@Data
@TableName("s_rollback")
public class SRollback implements Serializable {

    /**
     * serialVersionUID.
     */
    private static final long serialVersionUID = 1L;

    /**
     * 模型名称
     */
    public static final String NAME = "回退申请";

    /**
     * guid对应表字段
     */
    public static final String COLUMN_GUID = "guid";

    /**
     * guidWorkitem对应表字段
     */
    public static final String COLUMN_GUID_WORKITEM = "guid_workitem";

    /**
     * rollbackStatus对应表字段
     */
    public static final String COLUMN_ROLLBACK_STATUS = "rollback_status";

    /**
     * rollbackTime对应表字段
     */
    public static final String COLUMN_ROLLBACK_TIME = "rollback_time";

    /**
     * applyPerson对应表字段
     */
    public static final String COLUMN_APPLY_PERSON = "apply_person";

    /**
     * disposePerson对应表字段
     */
    public static final String COLUMN_DISPOSE_PERSON = "dispose_person";

    /**
     * rollbackDesc对应表字段
     */
    public static final String COLUMN_ROLLBACK_DESC = "rollback_desc";

    /**
     * guid逻辑名
     */
    public static final String NAME_GUID = "数据id";

    /**
     * guidWorkitem逻辑名
     */
    public static final String NAME_GUID_WORKITEM = "工作项GUID";

    /**
     * rollbackStatus逻辑名
     */
    public static final String NAME_ROLLBACK_STATUS = "回退状态";

    /**
     * rollbackTime逻辑名
     */
    public static final String NAME_ROLLBACK_TIME = "回退时间";

    /**
     * applyPerson逻辑名
     */
    public static final String NAME_APPLY_PERSON = "申请人";

    /**
     * disposePerson逻辑名
     */
    public static final String NAME_DISPOSE_PERSON = "处理人";

    /**
     * rollbackDesc逻辑名
     */
    public static final String NAME_ROLLBACK_DESC = "回退原因";

    /**
     * 数据id
     */
    @TableId
    private Integer guid;

    /**
     * 工作项GUID:唯一标示某条数据（自增长）
     */
    @JSONField(serializeUsing = CommonCascadeSerializer.class)
    private Integer guidWorkitem;

    /**
     * 回退状态:回退状态：
     *  0  回退成功
     *  1  回退中
     */
    @JSONField(deserializeUsing = CommonEnumDeserializer.class)
    private RollbackStatus rollbackStatus;

    /**
     * 回退时间
     */
    private Date rollbackTime;

    /**
     * 申请人
     */
    private String applyPerson;

    /**
     * 处理人
     */
    private String disposePerson;

    /**
     * 回退原因
     */
    private String rollbackDesc;

}

